package com.thiswhyme.stream.rabbit.publish;

import java.util.Map;

/**
 * @description: 普通消息发送器
 * @author: thiswhyme
 * @date: 2021/1/15
 */
public abstract class AbstractCommonPublisher implements IPublisher {

    /**
     * 投递消息
     * @param msg 消息内容
     */
    public void send(Object msg) {
        send(null, msg);
    }

    /**
     * 投递消息
     * @param headers 自定义消息头
     * @param msg 消息内容
     */
    public void send(Map<String, Object> headers, Object msg) {
        defaultSend(getOutputChannel(), headers, msg);
    }
}
